<?php

use Illuminate\Http\Request;
use Illuminate\Support\Facades\Route;

/*
|--------------------------------------------------------------------------
| API Routes
|--------------------------------------------------------------------------
|
| Here is where you can register API routes for your application. These
| routes are loaded by the RouteServiceProvider within a group whcheckStatusich
| is assigned the "api" middleware group. Enjoy building your API!
|
*/

Route::middleware('auth:sanctum')->get('/user', function (Request $request) {
    return $request->user();
});

Route::group(['prefix' => 'v1','namespace'=>'App\Http\Controllers\Api\V2'], function() {
    Route::group(['prefix' => 'paytm',], function() {
        Route::post('pay_page', 'PaytmController@payPage');
        Route::post('check_status', 'PaytmController@checkStatus');
        Route::post('refund', 'PaytmController@refund');
        Route::post('verify_callback', 'PaytmController@verifyCallback');
        Route::get('pay', 'PaytmController@Pay');
        Route::get('order_confirmed', 'PaytmController@orderConfirmed');
    });
});

